using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Copy : MonoBehaviour
{
    public GameObject g;
    public int count = 1000;
    public float rangeX = 10f;
    public float rangeY = 20f;
    public int total;
    void Start()
    {

    }

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.F))
        {
            for (int i = 0; i < count; i++)
            {
                GameObject _ins = Instantiate(g);
                float x = Random.Range(-rangeX, rangeX);
                float y = Random.Range(-rangeY, rangeY);
                _ins.transform.position = new Vector3(x, y, 0);
            }
            total += count;
        }
    }

}
